Conversation
|
🚀 New build available for commit |
|
🚀 New build available for commit |
|
This fix is fine and I tested it but these lines of code a little further down... YIKES. Lines 286 to 302 in 098dd33 It appears that it is summing up all the wavefronts into a matrix called sum which is great but inside the loop it is calculating the average. So if you have 100 wavefronts (Yordan often has 100 wavefronts) and looking at the statistics it calculates the average 100 times (not 99, 100). And calculates the standard deviation 100 times. That code (lines 294-297) should be outside the for loop. I'm pretty sure. Also one could just put only the zernike's in a table instead of creating an entire wavefront matrix and do the std deviation on just the table of zernikes (once for each of the 49 or so zernikes). Anyway, I don't want to mess with it as it would need careful testing I think. |
gr5
left a comment
There was a problem hiding this comment.
good looks great. Tested in qt5 and it works.
I already hesitated to mess too much with the part of code I touched. |
|
The stats makes a running average. Showing the average as you add each wave front. The purpose is to show how the average converges to a stable average and when that happens / if that happens. I don't know if that is what you are looking at but if so that is the purpose. |
|
Yeah so it's good we didn't mess with that code. I thought maybe you put some lines of code in there by accident but then was thinking about the "avg=sum/j+1" part and the j+1 part makes me realize you meant it to be in the loop. So okay, that makes sense. |
|
Just a reminder of the history of that feature. We knew that if you can make the noise random (air currents sort of are) then if you average enough wave fronts samples to randomize the noise you can remove the noise. The trick is knowing when you have enough samples. That depends on the number of samples and the noise. So I wanted a way to show when enough samples had been taken. That feature average each sample as a running average and when/if the STD or other values you watch settle into the lowest value you have enough samples. |
|
Ah. That makes sense. |
fix #283